package cn.stylefeng.guns.modular.business.service;


import cn.stylefeng.guns.base.pojo.node.TreeviewNode;
import cn.stylefeng.guns.base.pojo.node.ZTreeNode;
import cn.stylefeng.guns.modular.business.entity.Category;
import cn.stylefeng.guns.modular.business.model.result.CategoryResultView;
import cn.stylefeng.guns.modular.business.model.result.CategoryTypeView;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;


public interface CategoryService extends IService<Category> {


    void addCategory(Category category);


    void editCategory(Category category);


    void deleteCategory(Long categoryId);


    List<ZTreeNode> tree();


    List<TreeviewNode> treeviewNodes();


    Page<Category> list(String condition, String categoryId);


    List<CategoryResultView> getCategories(Long categoryId, Boolean isAll);


    List<CategoryTypeView> getCategoriesType();

    void initCacheCategories();

    Category getCategoryById(Long categoryId);
}
